package com.wisdudu.blank.data.bean;

import android.databinding.ObservableField;

import com.kelin.mvvmlight.base.ViewModel;
import com.kelin.mvvmlight.command.ReplyCommand;
import com.wisdudu.frame.base.BaseFragment;

/**
 * Created by ypp on 2016/9/2.
 */
public class WeekInfo implements ViewModel {
    private String name;
    private int id;
    public ObservableField<Boolean> isCheck = new ObservableField<>();
    public BaseFragment baseFragment;
    public OnItemClickListener onItemClickListener;

    public ReplyCommand onItemClick = new ReplyCommand(() -> {
        onItemClickListener.onItemClick(isCheck, name, id);
    });

    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
        this.onItemClickListener = onItemClickListener;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public interface OnItemClickListener {
        void onItemClick(ObservableField<Boolean> isCheck, String name, int id);
    }

    public ObservableField<Boolean> getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(ObservableField<Boolean> isCheck) {
        this.isCheck = isCheck;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
